package com.yunchao.app

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.yunchao.app.presentation.splash.SplashActivity

class BootReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        if (intent?.action == Intent.ACTION_BOOT_COMPLETED) {
          context?.startActivity(Intent(context, SplashActivity::class.java).apply {
              addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
          })
        }
    }
}